<template>
    <f7-toolbar tabbar labels class="main-toolbar" toolbar-fixed>
        <f7-link icon-fa="home" text="资讯" router-tab-link="/" href="/" :class="{'on': currUrl == '/' || currUrl == '#index'}"></f7-link>
        <f7-link icon-fa="user" text="通讯录" router-tab-link="/contactList/index" href="/contactList/index" :class="{'on': currUrl.indexOf('/contactList/') !== -1}"></f7-link>
        <f7-link icon-fa="plus-square" text="" class="btm-btn-add" open-popup="#publish" :class="{'on': currUrl.indexOf('#publish') !== -1}"></f7-link>
        <f7-link icon-fa="compass" text="动态" router-tab-link="/newsFeed/" href="/newsFeed/" :class="{'on': currUrl.indexOf('/newsFeed/') !== -1}"></f7-link>
        <f7-link icon-fa="user-o" text="我的" router-tab-link="/my/" href="/my/" :class="{'on': currUrl.indexOf('/my/') !== -1}"></f7-link>
    </f7-toolbar>
</template>

<script>
    export default {
        data() {
            return {
                currUrl: ''
            }
        },
        mounted() {
            this.$nextTick(() => {
                this.currUrl = this.$f7.getCurrentView().url
            })
        }
    }
</script>
